import React from 'react';
import {
  Form,
  Modal,
} from 'antd';

import DescriptionList from '@/components/DescriptionList';

const { Description } = DescriptionList;

// 查看详情
const DescView = Form.create()(props => {
  const { lookDescView, handleLookDesc, selectedRows } = props;
  const status = (status) => {
    if (status === 1) {
      return '未放款';
    }else if(status === 2) {
      return '放款中';
    }else if(status === 3) {
      return '成功';
    }else if(status === 4) {
      return '失败';
    }
  };
  return (
    <Modal
      width={640}

      destroyOnClose
      title="查看放款信息"
      visible={lookDescView}
      onOk={() => handleLookDesc(false,[])}
      onCancel={() => handleLookDesc(false, [])}>
      <DescriptionList size="large" style={{ marginBottom: 32 }} col="2">
        <Description term="注册时间">{selectedRows.regTime}</Description>
        <Description term="首次出借时间">{selectedRows.borrowTime}</Description>
        <Description term="用户编号">{selectedRows.userNo}</Description>
        <Description term="是否出借">{selectedRows.borrow?'是':"否"}</Description>
        <Description term="是否实名">{selectedRows.account?'是':"否"}</Description>
        <Description term="实名时间">{selectedRows.accountTime}</Description>
      </DescriptionList>
    </Modal>
  );
});

export default DescView;
